{if $smarty.get.print != 1}
  {include file="header.tpl"}
{else}
  {include file="headerPrint.tpl"}
{/if}
<form name="form1" action="" method="post">
<div class="contentDiv">
	<table align="center" cellspacing="0" cellpadding="2" style="border:1px solid;">
	 {if $smarty.get.print != 1}
		<tr>
			<th></font><font size="3" color="red">{$l_kaarigarName}</font>|</th>
			<th align="right"><font size="3" color="red">{$l_crAmount}</font> |</th>
			<th align="right"><font size="3" color="red">{$l_drAmount}</font> |</th>
			<th align="center"><font size="3" color="red">&nbsp;&nbsp;Dr-Cr</font> |</th>
			<th align="right"><font size="3" color="red">Vadh Ghat</font> |</th>
			<th align="right"><font size="3" color="red">Add VadhGhat</font></th>
		</tr>
		{else}
		 <tr>
			<th>{$l_kaarigarName} |</th>
			<th align="right">{$l_crAmount} |</th>
			<th align="right">{$l_drAmount} |</th>
			<th align="center">&nbsp;&nbsp;Dr-Cr |</th>
			<th align="right">Vadh Ghat |</th>
			<th align="right">Add VadhGhat</th>
		</tr>
		{/if}
		<tr>
			<td colspan="6"><hr/></td>
		</tr>
		{section name="sec" loop=$kaarigar|@count}
		  <tr>
		  	<td>{$kaarigar[sec].name} |</td>
		  	<td align="right" style="color:red;">{$kaarigar[sec].crAmount|string_format:"%.0f"} |</td>
		  	<td align="right" style="color:green;">{$kaarigar[sec].drAmount|string_format:"%.0f"} |</td>
		  	
		  	{if $kaarigar[sec].drMinusCr >0}
		  	  <td align="right" style="color:red;">{$kaarigar[sec].drMinusCr|string_format:"%.0f"} |</td>
		  	{else}
		  	  <td align="right" style="color:green;">{$kaarigar[sec].drMinusCr|string_format:"%.0f"} |</td>
		  	{/if}
		  	
		  	{if $kaarigar[sec].vadhaaroGhatado >0}
		  	  <td align="right" style="color:red;">{$kaarigar[sec].vadhaaroGhatado|string_format:"%.0f"} |</td>
		  	{else}
		  	  <td align="right" style="color:green;">{$kaarigar[sec].vadhaaroGhatado|string_format:"%.0f"} |</td>
		  	{/if}
		  	
		  	{if $kaarigar[sec].addVadhaaroGhataado >0}
		  	  <td align="right" style="color:red;">{$kaarigar[sec].addVadhaaroGhataado|string_format:"%.0f"} </td>
		  	{else}
		  	  <td align="right" style="color:green;">{$kaarigar[sec].addVadhaaroGhataado|string_format:"%.0f"} </td>
		  	{/if}
		  </tr>
		{/section}
		<tr>
			<td colspan="6"><hr/></td>
		</tr>
		<tr>
			<th align="right">{$l_total}</th>
			<th align="right" style="color:red;">{$crAmountTotal|string_format:"%.0f"} |</th>
			<th align="right" style="color:green;">{$drAmountTotal|string_format:"%.0f"} |</th>
			
			{if $total.drMinusCr > 0}
			  <th align="right" style="color:red;">{$total.drMinusCr|string_format:"%.0f"} |</th>
			{else}
			  <th align="right" style="color:green;">{$total.drMinusCr|string_format:"%.0f"} |</th>
			{/if} 
			 
			{if $total.vadhGhat >0}
			  <th align="right" style="color:red;">{$total.vadhGhat|string_format:"%.0f"} |</th>
			{else}
			  <th align="right" style="color:green;">{$total.vadhGhat|string_format:"%.0f"} |</th>
			{/if}
			
			{if $total.addVadhaaroGhataado >0}
			  <th align="right" style="color:red;">{$total.addVadhaaroGhataado|string_format:"%.0f"}</th>
			{else}
			  <th align="right" style="color:green;">{$total.addVadhaaroGhataado|string_format:"%.0f"}</th>
			{/if}
		</tr>
		{if $smarty.get.print != 1}
    	<div align="right"><a href="kaarigarSummery.php?print=1"><font size="4" color="red">Summary Print</font></a></div>
    {else}
    &nbsp;
   {/if}

	</table>
	
</div>

{if $smarty.get.print != 1}
  {include file="footer.tpl"}
{/if}